﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UFIDA.U9.Cust.XH.PlugBE.Tool
{
    public class OADepResult
    {
        public string code { get; set; }
        public string msg { get; set; }
        public dynamic result { get; set; }
    }

 
    public class ReqTwoMode<T>
    {
        public ReqTwoMode() { }
        public ReqTwoMode(dataModel<T> m)
        {

            data.Add(m);
            header = new Header();
        }
        public List<dataModel<T>> data = new List<dataModel<T>>();
        public Header header = new Header();

    }
    public class dataModel<T>
    {
        public dataModel(T m)
        {
            this.mainTable = m;
            operationinfo = new { operationDate = DateTime.Now.ToString("yyyy-MM-dd"), operationTime = DateTime.Now.ToString("HH:mm:ss"), operatoroperator = 1 };
        }
        public object operationinfo { get; set; }
        public T mainTable { get; set; }
    }
    public class Header
    {
        public Header()
        {
            this.currentDateTime = DateTime.Now.ToString("yyyyMMddHHmmss");
            this.systemid = OAUrlHelper.Systemid;
            string psw = OAUrlHelper.D_Password;
            this.Md5 = OAUrlHelper.GetMd5Hash(this.systemid + psw + this.currentDateTime).ToLower();
        }
        public string systemid { get; set; }
        public string currentDateTime { get; set; }
        public string Md5 { get; set; }
    }
    /// <summary>
    /// 创建OA流程返回结果对象
    /// </summary>
    public class OARequestResult
    {
        /// <summary>
        /// success 成功
        /// </summary>
        public string code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public Data data { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public ErrMsg errMsg { get; set; }

    }
    public class Data
    {
        /// <summary>
        /// 
        /// </summary>
        public string requestid { get; set; }
    }

    public class ErrMsg
    {
    }

}
